﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt23.aspx.cs" Inherits="KMrpt23" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>店铺商品销售尺码表</title>
    <script src="js/extTools.js" type="text/javascript"></script>
    <style>
        .x-grid-row-over .x-grid-cell-inner
        {
            font-weight: bold;
        }
        .x-column-header-inner
        {
            height: 28px;
            background: #E7EBEF url(./images/header.png) repeat-x 0 0;
        }
    </style>
    <script>
        var areachange = function (obj) {
            //alert(obj.value);
            CompanyX.binStock(obj.value);
        }
        var saveData = function () {
            App.Hidden1.setValue(Ext.encode(App.GridPanel1.getRowsValues({ selectedOnly: false, currentPageOnly: true })));
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
            <Items>
                <ext:Hidden ID="FormatType" runat="server" />
                <ext:Hidden ID="Hidden1" runat="server" />
                <ext:GridPanel ID="GridPanel1" runat="server" TitleAlign="Center">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server" Layout="Container">
                            <Items>
                                <ext:Toolbar ID="Toolbar3" runat="server" Layout="ColumnLayout">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtbdate" FieldLabel="日期" />
                                        <ext:Label ID="Label1" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtedate" />
                                        <ext:Button ID="Button1" runat="server" Text="查询" OnDirectClick="BtnQureyUser" UI="Info"
                                            Icon="Find">
                                            <DirectEvents>
                                                <Click Timeout="90000">
                                                    <EventMask ShowMask="true" Msg="加载中...">
                                                    </EventMask>
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Component ID="Component2" runat="server" Width="1500" Padding="5">
                                        </ext:Component>
                                        <ext:MultiCombo runat="server" ID="OperationArea" FieldLabel="地区" DisplayField="OperationAreaName"
                                            ValueField="OperationAreaID">
                                            <Store>
                                                <ext:Store runat="server" ID="st_area">
                                                    <Model>
                                                        <ext:Model ID="Model1" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="OperationAreaID" />
                                                                <ext:ModelField Name="OperationAreaName" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                            <Listeners>
                                                <Change Fn="areachange" />
                                            </Listeners>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="arealist" FieldLabel="省份" DisplayField="AreaName"
                                            ValueField="AreaID">
                                            <Store>
                                                <ext:Store runat="server" ID="Store2">
                                                    <Model>
                                                        <ext:Model ID="Model3" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="AreaID" />
                                                                <ext:ModelField Name="AreaName" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                            <Listeners>
                                                <Change Fn="areachange" />
                                            </Listeners>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtstock" FieldLabel="店铺" DisplayField="shopname"
                                            ValueField="shopid">
                                            <Store>
                                                <ext:Store runat="server" ID="st_stock">
                                                    <Model>
                                                        <ext:Model ID="Model6" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="shopid" />
                                                                <ext:ModelField Name="shopname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:Component ID="Component1" runat="server" Width="1500" Padding="5">
                                        </ext:Component>
                                        <ext:MultiCombo runat="server" ID="txtseason" FieldLabel="季节" DisplayField="seasonname"
                                            ValueField="seasonname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store4">
                                                    <Model>
                                                        <ext:Model ID="Model5" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="seasonname" />
                                                                <ext:ModelField Name="seasonname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtyear" FieldLabel="年份" DisplayField="yearno"
                                            ValueField="yearno">
                                            <Store>
                                                <ext:Store runat="server" ID="Store3">
                                                    <Model>
                                                        <ext:Model ID="Model8" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="yearno" />
                                                                <ext:ModelField Name="yearno" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtmatkind" FieldLabel="类别" DisplayField="kindname"
                                            ValueField="kindname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store5">
                                                    <Model>
                                                        <ext:Model ID="Model7" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="kindname" />
                                                                <ext:ModelField Name="kindname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                    </Items>
                                </ext:Toolbar>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="Store1" runat="server" PageSize="3000" OnReadData="RefreshDataSet"
                            OnSubmitData="Store1_Submit">
                            <Model>
                                <ext:Model ID="Model2" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="店铺代码" ServerMapping="shopcode" Type="String" />
                                        <ext:ModelField Name="店铺简称" ServerMapping="shopname" Type="String" />
                                        <ext:ModelField Name="年份" ServerMapping="yearno" Type="String" />
                                        <ext:ModelField Name="季节" ServerMapping="seasonname" Type="String" />
                                        <ext:ModelField Name="类别" ServerMapping="kindname" Type="String" />
                                        <ext:ModelField Name="货号" ServerMapping="MaterialCode" Type="String" />
                                        <ext:ModelField Name="系列" ServerMapping="seriesname" Type="String" />
                                        <ext:ModelField Name="货品简称" ServerMapping="MaterialShortName" Type="String" />
                                        <ext:ModelField Name="项目" ServerMapping="itemname" Type="String" />
                                        <ext:ModelField Name="数量" ServerMapping="qty" Type="Float" />
                                        <ext:ModelField Name="po28" ServerMapping="po28" Type="Float" />
                                        <ext:ModelField Name="po29" ServerMapping="po29" Type="Float" />
                                        <ext:ModelField Name="po30" ServerMapping="po30" Type="Float" />
                                        <ext:ModelField Name="po31" ServerMapping="po31" Type="Float" />
                                        <ext:ModelField Name="po32" ServerMapping="po32" Type="Float" />
                                        <ext:ModelField Name="po33" ServerMapping="po33" Type="Float" />
                                        <ext:ModelField Name="po34" ServerMapping="po34" Type="Float" />
                                        <ext:ModelField Name="po36" ServerMapping="po36" Type="Float" />
                                        <ext:ModelField Name="po38" ServerMapping="po38" Type="Float" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="店铺代码" DataIndex="店铺代码" />
                            <ext:Column ID="Column2" runat="server" Text="店铺简称" DataIndex="店铺简称" Width="150" />
                            <ext:Column ID="Column3" runat="server" Text="年份" DataIndex="年份" />
                            <ext:Column ID="Column4" runat="server" Text="季节" DataIndex="季节" />
                            <ext:Column ID="Column5" runat="server" Text="类别" DataIndex="类别" />
                            <ext:Column ID="Column6" runat="server" Text="货号" DataIndex="货号" Width="150"/>
                            <ext:Column ID="Column7" runat="server" Text="系列" DataIndex="系列" />
                            <ext:Column ID="Column8" runat="server" Text="货品简称" DataIndex="货品简称" />
                            <ext:Column ID="Column9" runat="server" Text="项目" DataIndex="项目" />
                            <ext:Column ID="Column10" runat="server" Text="数量" DataIndex="数量" />
                            <ext:Column ID="Column11" runat="server" Text="JM">
                                <Columns>
                                    <ext:Column ID="Column12" runat="server" Text="S">
                                        <Columns>
                                            <ext:Column ID="Column13" runat="server" Text="28">
                                                <Columns>
                                                    <ext:Column ID="Column14" runat="server" Text="39" DataIndex="po28" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column15" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column16" runat="server" Text="M">
                                        <Columns>
                                            <ext:Column ID="Column17" runat="server" Text="29">
                                                <Columns>
                                                    <ext:Column ID="Column18" runat="server" Text="40" DataIndex="po29" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column19" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column20" runat="server" Text="L">
                                        <Columns>
                                            <ext:Column ID="Column21" runat="server" Text="30">
                                                <Columns>
                                                    <ext:Column ID="Column22" runat="server" Text="41" DataIndex="po30" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column23" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column24" runat="server" Text="XL">
                                        <Columns>
                                            <ext:Column ID="Column25" runat="server" Text="31">
                                                <Columns>
                                                    <ext:Column ID="Column26" runat="server" Text="42" DataIndex="po31" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column27" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column28" runat="server" Text="2XL">
                                        <Columns>
                                            <ext:Column ID="Column29" runat="server" Text="32">
                                                <Columns>
                                                    <ext:Column ID="Column30" runat="server" Text="43" DataIndex="po32" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column31" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column32" runat="server" Text="3XL">
                                        <Columns>
                                            <ext:Column ID="Column33" runat="server" Text="33">
                                                <Columns>
                                                    <ext:Column ID="Column34" runat="server" Text="44" DataIndex="po33" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column35" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column36" runat="server" Text="4XL">
                                        <Columns>
                                            <ext:Column ID="Column37" runat="server" Text="34">
                                                <Columns>
                                                    <ext:Column ID="Column38" runat="server" Text="45" DataIndex="po34" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column39" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column40" runat="server" Text="">
                                        <Columns>
                                            <ext:Column ID="Column41" runat="server" Text="36">
                                                <Columns>
                                                    <ext:Column ID="Column42" runat="server" Text="" DataIndex="po36" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                             <ext:Column ID="Column43" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column44" runat="server" Text="">
                                        <Columns>
                                            <ext:Column ID="Column45" runat="server" Text="38">
                                                <Columns>
                                                    <ext:Column ID="Column46" runat="server" Text="" DataIndex="po38" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column47" runat="server" Text="">
                                <Columns>
                                    <ext:Column ID="Column48" runat="server" Text="">
                                        <Columns>
                                            <ext:Column ID="Column49" runat="server" Text="">
                                                <Columns>
                                                    <ext:Column ID="Column50" runat="server" Text="" Align="Center" />
                                                </Columns>
                                            </ext:Column>
                                        </Columns>
                                    </ext:Column>
                                </Columns>
                            </ext:Column>
                        </Columns>
                    </ColumnModel>
                    <Features>
                        <ext:Summary ID="Summary1" runat="server">
                        </ext:Summary>
                    </Features>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                                <ext:Label ID="Label2" runat="server" Text="每页显示:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="1000" />
                                        <ext:ListItem Text="2500" />
                                        <ext:ListItem Text="3000" />
                                        <ext:ListItem Text="3500" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="3000" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                    </Listeners>
                                </ext:ComboBox>
                                <ext:Button ID="Button2" runat="server" Text="导出Excel" Icon="PageExcel" Visible="false">
                                    <Listeners>
                                        <Click Handler="exportData('xls');" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button3" runat="server" Text="导出(当前页)" AutoPostBack="true" OnClick="ToExcel"
                                    Icon="PageExcel">
                                    <Listeners>
                                        <Click Fn="saveData" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Label ID="Label3" runat="server" StyleSpec="color:red;" Text="提示：请使用分批导出功能！">
                                </ext:Label>
                            </Items>
                            <Plugins>
                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                            </Plugins>
                        </ext:PagingToolbar>
                    </BottomBar>
                    <Listeners>
                        <AfterLayout Handler="#{ToolbarDroppable1}.addDDGroup(this.child('headercontainer').reorderer.dragZone.ddGroup); doSort();"
                            Single="true" />
                    </Listeners>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
